From c3fa70c02e06e795f02343f85a7a54659aa14127 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Tue, 27 Mar 2007 20:07:15 +0000 Subject: [PATCH] stmwpp: Remove unreachable case target. Create route points when objective is set to rtedata. --- stmwpp.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/stmwpp.c b/stmwpp.c index 184245424..311bac403 100644 --- a/stmwpp.c +++ b/stmwpp.c @@ -3,7 +3,7 @@ Support for "Suunto Trek Manager" (STM) WaypointPlus files, see homepage "http://www.suunto.fi" for more details, - Copyright (C) 2005 Olaf Klein, o.b.klein@gpsbabel.org + Copyright (C) 2005,2007 Olaf Klein, o.b.klein@gpsbabel.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -155,16 +155,15 @@ stmwpp_data_read(void) switch(what) { - case STM_RTEPT: - if (route == NULL) { - route = route_head_alloc(); - route_add_head(route); - } - route_add_wpt(route, wpt); - break; - case STM_WAYPT: waypt_add(wpt); + if (global_opts.objective == rtedata) { + if (route == NULL) { + route = route_head_alloc(); + route_add_head(route); + } + route_add_wpt(route, waypt_dupe(wpt)); + } break; case STM_TRKPT: -- 2.30.2